home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // MTDemo.cpp
- //
- //***********************************************************************
-
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxmt.h>
- #include "Resource.h"
- #include "MTDemo.h"
- #include "MainFrame.h"
- #include "MTDoc.h"
- #include "MTView.h"
-
- CMTApp myApp;
-
- BEGIN_MESSAGE_MAP (CMTApp, CWinApp)
- ON_COMMAND (ID_FILE_OPEN, CWinApp::OnFileOpen)
- END_MESSAGE_MAP ()
-
- BOOL CMTApp::InitInstance ()
- {
- SetRegistryKey ("Programming Windows 95 with MFC");
- LoadStdProfileSettings ();
-
- CSingleDocTemplate* pDocTemplate;
- pDocTemplate = new CSingleDocTemplate (
- IDR_MAINFRAME,
- RUNTIME_CLASS (CMTDoc),
- RUNTIME_CLASS (CMainFrame),
- RUNTIME_CLASS (CMTView)
- );
-
- AddDocTemplate (pDocTemplate);
-
- CCommandLineInfo cmdInfo;
- ParseCommandLine (cmdInfo);
-
- if (!ProcessShellCommand (cmdInfo))
- return FALSE;
-
- m_pMainWnd->DragAcceptFiles ();
- return TRUE;
- }
-